<div class="bjui-pageHeader">
  <form id="pagerForm" data-toggle="ajaxsearch" action="{:U('billList')}" method="post">
    <div class="bjui-searchBar">
      <div class="bjui-searchBar">
        <label>银行：</label>
		<div role="group" class="btn-group">
			<select name="bank_id" data-toggle="selectpicker">
				<option value="">请选择网店</option>
				<?php foreach($bankList as $bank):?>
				<option value="{$bank.id}" <?php echo I("bank_id")==$bank['id'] ? "selected='true'" : "";?>>{$bank.name}</option>
				<?php endforeach;?>
			</select>
		</div>
		&nbsp;
		<label>账单订单时间：</label><input type="text" data-toggle='datepicker' value="{$start_time}" name="start_time" class="form-control" size="15"   />-<input type="text" data-toggle='datepicker' value="{$end_time}" name="end_time" class="form-control" size="15"  />
		
        <button type="submit" class="btn-default" data-icon="search">查询</button>
          <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true)" data-icon="undo">清空查询</a> &nbsp; 
        <div class="pull-right">
		<span><a href="{:U('addBill')}" class="btn btn-green" data-toggle="dialog" data-width="800" data-height="400" data-id="dialog-normal" data-mask="true" data-title="添加账单">添加</a></span>
        <div class="btn-group">
          <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">批量生成出库单<span class="caret"></span></button>
          <ul class="dropdown-menu right" role="menu">
		   <li><a href="{:U('delBill')}" data-toggle="doajaxchecked" data-confirm-msg="你确定要批量删除吗？" data-idname="ids" data-group="ids">批量删除</a></li>
          </ul>
        </div>
      </div>
      </div>
    </div>
  </form>
</div>
<div class="bjui-pageContent tableContent">
  <table class="table table-bordered table-hover table-striped table-top">
    <thead>
      <tr>
        <!-- 选择   订单号    网店单号    商品数量  订单状态   提交时间      操作  -->
        <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
        <th data-order-field="name" align="center">账单名称</th>
        <th data-order-field="bank_id" align="center">银行名称</th>
        <th data-order-field="start_time" align="center">账单订单时间</th>
        <th data-order-field="add_time" align="center">创建时间</th>
        <th data-order-field="status" align="center">账单状态</th>
        <th align="center">操作</th>
      </tr>
    </thead>
    <tbody>
      <?php foreach($list as $arr):?>
      <tr>
        <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$arr.id}"></td>
        <!-- 账单名称 -->
        <td align="center">{$arr.name}</td>
        <!-- 银行名称 -->
        <td align="center">{$arr.bank_name}</td>
        <!-- 账单订单时间 -->
        <td align="center">{:date('Y-m-d H:i:s', $arr['start_time'])}-{:date('Y-m-d H:i:s', $arr['end_time'])}</td>
        <!-- 创建时间 -->
        <td align="center">{:date('Y-m-d H:i:s', $arr['add_time'])}</td>
        <!-- 账单状态 -->
        <td align="center">{$arr.bill_status}</td>
        <!-- 操作 -->
        <td>
			<a href="{:U('import?id='.$arr['id'])}" class="btn btn-green" data-toggle="dialog" data-width="800" data-height="250" data-id="dialog-normal" data-mask="true" data-title="导入账单">导入账单</a>
			<a href="{:U('editBill?id='.$arr['id'])}" class="btn btn-green" data-toggle="dialog" data-width="800" data-height="400" data-id="dialog-normal" data-mask="true" data-title="{$arr.name}-编辑">编辑</a>
			<a href="{:U('delBill?ids='.$arr['id'])}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定删除这条账单吗？">删除</a> 
            <a data-toggle="navtab" class="btn btn-green" data-options="{id:'Bill{$arr['id']}', url:'{:U('accountCheckingList?id='.$arr['id'].'&bank_id='.$arr['bank_id'])}', reloadWarn:'已打开业务页面，确认将重新载入?', title:'{$arr.name}-对账详细'}">对账详细</a>
		</td>
      </tr>
      <?php endforeach;?>
    </tbody>
  </table>
</div>
<div class="bjui-pageFooter">
  <div class="pages"> <span>每页&nbsp;</span>
    <div class="selectPagesize">
      <select data-toggle="selectpicker" data-toggle-change="changepagesize">
        <option value="{$pageSize}">{$pageSize}</option>
        <option value="{$pageSize*3}">{$pageSize*3}</option>
        <option value="{$pageSize*6}">{$pageSize*6}</option>
        <option value="{$pageSize*12}">{$pageSize*12}</option>
        <option value="{$pageSize*15}">{$pageSize*15}</option>
      </select>
    </div>
    <span>&nbsp;条，共 {$total} 条</span> </div>
  <div class="pagination-box" data-toggle="pagination" data-total="{$total}" data-page-size="{$pageSize}"
         data-page-current="{$pageCurrent}"></div>
</div>
